//
//  SEGHouseAuthNotApplyView.m
//  SEGUhomePropertyBaseService
//
//  Created by 揭婧雯 on 2018/8/8.
//  Copyright © 2018年 刘山. All rights reserved.
//

#import "SEGHouseAuthNotApplyView.h"

@implementation SEGHouseAuthNotApplyView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setUpUI];
    }
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUpUI];
    }
    return self;
}

- (void)setUpUI
{
    UIImageView *imageView = [[UIImageView alloc] init];
    imageView.image = [UIImage imageWithContentsOfFile:SEGPicName(@"pic_default_attest")];
    [self addSubview:imageView];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(130);
        make.centerX.equalTo(self);
    }];
    
    UILabel *label = [[UILabel alloc] init];
    label.font = kFont_13;
    label.textColor = kColor_3;
    label.text = @"完成管理处认证，开启更多功能";
    [self addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(15);
        make.right.equalTo(self).offset(-15);
        make.top.equalTo(imageView.mas_bottom).offset(20);
//        make.height.mas_equalTo(44.0);
    }];
//    label.numberOfLines = 0;
    label.textAlignment = NSTextAlignmentCenter;
    
    UIButton *authButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [authButton setTitle:@"申请住户认证" forState:UIControlStateNormal];
    [authButton setTitleColor:kColor_1 forState:UIControlStateNormal];
//    [authButton setBackgroundColor:kColor_T];
    authButton.titleLabel.font = kFont_16;
    authButton.layer.masksToBounds = YES;
    authButton.layer.cornerRadius = 2.0;
    authButton.layer.borderWidth = 0.5;
    authButton.layer.borderColor = kColor_1.CGColor;
    self.authButton = authButton;
    [self addSubview:authButton];
    [authButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(label.mas_bottom).offset(40);
        make.centerX.equalTo(self);
        make.width.mas_equalTo(160);
        make.height.mas_equalTo(35);
    }];
}

@end
